#!/usr/bin/env python
# -*- coding: UTF-8 -*-
#
# Copyright [Gtlions Lai].
# Create Date:
# Update Date:
"""summarization ahout this script.

detail ahout this script

   Class(): summarization about Class
   ...
   function(): summarization about function
   ...
"""
__authors__ = '"Gtlions Lai" <gtlions.l@qq.com>'

import sys
from PyQt4 import QtGui, QtCore


class Main(QtGui.QMainWindow):
    def __init__(self, parent=None):
        QtGui.QMainWindow.__init__(self)
        self.setWindowTitle('QMainWindow')
        self.setGeometry(300, 300, 300, 300)
        grid = QtGui.QGridLayout()
        #self.setLayout(grid)

        self.menuBar = QtGui.QMenuBar()
        self.menu = QtGui.QMenu()
        self.menu.setTitle('menu')
        self.action = QtGui.QAction(self)
        self.action.setText('action')

        self.menu_2 = QtGui.QMenu()
        self.menu_2.setTitle('menu_2')
        self.action_2_1 = QtGui.QAction(self)
        self.action_2_1.setText('action_2_1')
        self.action_2_2 = QtGui.QAction(self)
        self.action_2_2.setText('action_2_2')

        self.menu.addAction(self.action)
        self.menu_2.addAction(self.action_2_1)
        self.menu_2.addAction(self.action_2_2)
        self.menuBar.addMenu(self.menu)
        self.menuBar.addMenu(self.menu_2)
        self.setMenuBar(self.menuBar)


if __name__ == "__main__":
    app = QtGui.QApplication(sys.argv)
    main = Main()
    main.show()
    sys.exit(app.exec_())